<%= @message if @message != ''%>

Name: <%= @ticket.name %>
Deadline: <%= @ticket.deadline %>
Created by <%=h @ticket.created_by ? @ticket.created_by.name : "somebody" %>
 <% if @ticket.updated_at -%>
<%= @ticket.group_id == 0 ? "Closed by" : "Updated by" %> <%=h @ticket.updated_by ? @ticket.updated_by.name : "somebody" %> at <%= @ticket.updated_at  %>
<% end -%>
Type: <%= @ticket.ticket_template.name %>
Number: <%= @ticket.number %>
Group: <%= @ticket.group.name %>

<% @ticket.notes.each { |note| -%>
<% if !note.empty? -%>
<% result = note.note_type.name -%>
<%= note.note_type.vtype == 'vcheckbox' ? result : result += (': ' + note.value.to_s) %>

<% end -%>
<% } -%>
